package com.cxso.example.domain.wlpt.goods;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
@Accessors(chain = true)
@Schema(description = "货源线路信息")
public class ApiGoodsLineDomain {

    @Schema(description = "发货省")
    @NotBlank(message = "发货省不能为空！")
    private String sendProvince;

    @Schema(description = "发货市")
    @NotBlank(message = "发货市不能为空！")
    private String sendCity;

    @Schema(description = "发货区")
    @NotBlank(message = "发货区不能为空！")
    private String sendArea;

    @Schema(description = "发货详细地址")
    @NotBlank(message = "发货详细地址不能为空！")
    private String sendAddress;

    @Schema(description = "发货详细地址备注")
    private String sendAddressRemark;

    @Schema(description = "发货经度")
    @NotNull(message = "发货经度不能为空！")
    private BigDecimal sendLon;

    @Schema(description = "发货纬度")
    @NotNull(message = "发货纬度不能为空！")
    private BigDecimal sendLat;

    @Schema(description = "发货联系人")
    private String sendPerson;

    @Schema(description = "发货联系手机号")
    @Pattern(regexp = "^((1[3-9]\\d{9})|(\\d{3,4}-\\d{7,8}))?$", message = "发货联系人手机号格式不正确！")
    private String sendPhone;

    @Schema(description = "计划发货时间")
    private Date sendPlanTime;

    @Schema(description = "收货省")
    @NotBlank(message = "收货省不能为空！")
    private String deliveryProvince;

    @Schema(description = "收货市")
    @NotBlank(message = "收货市不能为空！")
    private String deliveryCity;

    @Schema(description = "收货区")
    @NotBlank(message = "收货区不能为空！")
    private String deliveryArea;

    @Schema(description = "收货详细地址")
    @NotBlank(message = "收货详细地址不能为空！")
    private String deliveryAddress;

    @Schema(description = "收货详细地址备注")
    private String deliveryAddressRemark;

    @Schema(description = "收货经度")
    @NotNull(message = "收货经度不能为空！")
    private BigDecimal deliveryLon;

    @Schema(description = "收货纬度")
    @NotNull(message = "收货纬度不能为空！")
    private BigDecimal deliveryLat;

    @Schema(description = "收货联系人")
    private String deliveryPerson;

    @Schema(description = "收货联系手机号")
    @Pattern(regexp = "^((1[3-9]\\d{9})|(\\d{3,4}-\\d{7,8}))?$", message = "收货联系人手机号格式不正确！")
    private String deliveryPhone;

    @Schema(description = "计划收货时间")
    private Date deliveryPlanTime;
}
